﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Collections;
using QLHS2010;

namespace QLHS2010_DAL_WS
{
    /// <summary>
    /// Summary description for QLHS2010_DAL_WebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class QLHS2010_DAL_WebService : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        public HocSinhDTO[] getDsHocSinh()
        {
            HocSinhDAO hsDAO = new HocSinhDAO();
            return hsDAO.getDsHocSinh();
        }

        [WebMethod]
        public void insertHocSinh(HocSinhDTO info)
        {
            HocSinhDAO hsDAO = new HocSinhDAO();
            hsDAO.insert(info);
        }

        [WebMethod]
        public void updateHocSinh(HocSinhDTO info)
        {
            HocSinhDAO hsDAO = new HocSinhDAO();
            hsDAO.update(info);
        }

        [WebMethod]
        public void deleteHocSinh(string maHS)
        {
            HocSinhDAO hsDAO = new HocSinhDAO();
            hsDAO.delete(maHS);
        }

        [WebMethod]
        public LopDTO[] getDsLop()
        {
            LopDAO lopDAO = new LopDAO();
            return lopDAO.getDsLop();
        }
    }
}
